<template>
	<image :src="img" class="img" mode="aspectFill" @click="onResetCode()"></image>
</template>

<script>
	import Vue from 'vue'
	import config from "@/config/config.js";
	export default {
		data() {
			return {
				img: ""
			}
		},
		mounted() {
			this.onResetCode()
		},
		methods: {
			// 刷新验证码
			onResetCode() {
				const uniqid = new Date().getTime()
				this.img = config.baseURL+"/api/common/captcha?t="+uniqid;
				this.$emit('success',uniqid)
			},
		}
	}
</script>

<style lang="scss" scoped>
	#testsvg {
		height: 88rpx;
	}

	.img {
		width: 100%;
		height: 100%;
		border-radius: 100px;

	}
</style>